home *** CD-ROM | disk | FTP | other *** search
- Path: mozo.cc.purdue.edu!not-for-mail
- From: hrubin@b.stat.purdue.edu (Herman Rubin)
- Newsgroups: comp.arch.arithmetic,comp.lang.c,comp.lang.c++,comp.lang.misc
- Subject: Languages and architecture Was: Re: Access carry flag from C
- Date: 28 Feb 1996 08:46:51 -0500
- Organization: Purdue University Statistics Department
- Message-ID: <4h1mcb$178u@b.stat.purdue.edu>
- References: <Dn1C9z.DGv.0.net@indra.com> <3132f352.32867731@netline-fddi.jpl.nasa.gov>
- NNTP-Posting-Host: b.stat.purdue.edu
-
- In article <3132f352.32867731@netline-fddi.jpl.nasa.gov>,
- Kevin Quitt <kdq@emoryi.jpl.nasa.gov> wrote:
- >On Mon, 19 Feb 1996 18:20:22 GMT, sullivan@indra.com (Steve Sullivan) wrote:
-
- >>Is it possible to determine if a fixed point overflow has
- >>occurred from within C?
-
- >No, it's not, because as far as C is concerned, there doesn't have to be a
- >carry bit. Once overflow has occurred, you're into undefined behaviour.
-
- This is a problem with C and just about every other language, which
- impacts adversely the architecture of machines.
-
- The language designers typically remove much of what a knowledgeable
- user will want to use from the language, because their own knowledge
- is lacking in that area. Then the designers of the arithmetic units
- of the machines drop that property, because the languages do not
- have it.
-
- And now we have computers on which many cheap instructions and
- properties are not present. We cannot detect overflow, so we
- are forced to either use many times the number of instructions,
- or find some other clumsy way areound the problem. We cannot
- do decent precise fixed point arithmetic, so the time for
- multiple precision arithmetic, fixed or floating, is increased
- by a substantial factor. Even the floating point unit has been
- restricted so that, for example, doubling the machine precision
- is a major undertaking.
-
- We can always simulate any computer on any other. Hardware
- deficiencies are not handled efficiently by software.
-
- --
- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
- hrubin@stat.purdue.edu Phone: (317)494-6054 FAX: (317)494-0558
-